1. Field of the Invention
The present invention relates to an audio apparatus in which a pitch and a note-on/note-off event of musical sound are extracted from an acoustic signal to generate performance information such as a MIDI (Musical Instrument Digital Interface) message. More particularly, the invention relates to the audio apparatus suitable for obtaining the musical performance information from an acoustic signal having a wide frequency range.
2. Description of Related Art
It is widely practiced in the field of electronic musical instruments that acoustic vibrations produced by playing musical instruments such as stringed instruments, percussion instruments, and wind instruments are converted into electrical oscillation signals, from which performance information such as pitch information and note-on/note-off information is detected in realtime to form a MIDI message. Supplying this MIDI message to a tone generator of a synthesizer, for example, can reproduce in realtime a melody being performed by a player in desired tones with desired sound effects and desired accompaniments.
In the above-mentioned processing in which the pitch information and the note-on/note-off information are detected from the electrical oscillation signal, the inputted electrical oscillation signal is first converted into a corresponding digital signal. Then, a frequency spectrum of the digital signal is limited by a lowpass filter. Zero cross points of instantaneous values of the filtered digital signal are analyzed for pitch detection. An amplitude envelope of the filtered digital signal is detected by an envelope follower. The envelope follower detects an upward or attack portion of the filtered signal, and then forms a downward or decay portion of an envelope waveform by a predetermined slope. Then, a level of the amplitude envelope detected by the envelope follower is compared with a predetermined threshold for determination of a note-on or note-off event.
For reliable detection of the above-mentioned pitch information and note-on/note-off information, a cutoff frequency of the lowpass filter and the slope of the envelope waveform at the decay portion formed by the envelope follower must be set to adapt to the basic frequency of the electrical oscillation signal. However, a practical frequency band of the lowpass filter is limited in which the reliable pitch detection is allowed. The frequency band of the lowpass filter can be tuned according to the cutoff frequency. The practical frequency band is limited to at most about two octaves for the following reasons. First, if the frequency of the inputted acoustic signal goes too low relative to the cutoff frequency, a harmonic frequency component increases excessively to frequently cause erroneous or false zero crosses due to the harmonic frequency component in addition to true zero crosses due to the basic frequency component, thereby disabling the reliable pitch detection. Second, if the frequency of the inputted acoustic signal goes too high relative to the cutoff frequency, the basic frequency components is also cut off, thereby disabling the reliable pitch detection.
Also, a practical frequency band is limited in which the reliable note-on/note-off detection is ensured at the predetermined slope of the envelope waveform of the decay portion. The practical frequency band is limited for the following reasons. First, as shown in FIG. 6(A), if the frequency of the inputted acoustic signal F stays too slow relative to the slope S of the decay portion of the envelope waveform, the envelope level falls below a threshold of note-off in timing t1 at which the amplitude of the acoustic signal F does not yet fall below the note-off threshold, resulting in erroneous detection of the note-off event. Further, at timing t2 in which the instantaneous value of the acoustic signal F rises above a threshold of note-on, this is detected as a rising or attack edge of a next envelope, resulting in erroneous detection of a note-on event. Second, as shown in FIG. 6(B), if the frequency of the inputted acoustic signal F stays too fast relative to the slope S of the decay portion of the envelope waveform, the envelope level does not fall below a threshold of note-off even when timing t3 comes at which the amplitude of the acoustic signal F actually falls below the note-off threshold, thereby failing to detect a true note-off event. Further, at timing t4 in which the acoustic signal F again rises, an attack portion of a next envelope is not detected since the preceding decay portion is not detected, thereby disabling the detection of the note-on event at that rising edge.
The limitation of the practical frequency band in which the reliable pitch detection and note-on/note-off detection are enabled at a predetermined cutoff frequency and a predetermined slope of the envelope waveform of the decay portion will present no substantial problem, if the performance information is to be extracted by multichannel from a polyphonic musical instrument such as a stringed instrument having a plurality of strings. As for a guitar for example, the frequency band of the acoustic vibration of each of six strings stays within two octaves, thereby enabling the correct pitch detection and correct note-on/note-off detection for all frequency bands of the respective strings by means of the multichannel processing.
However, in detection of the performance information by a single channel from a monophonic instrument such as a wind instrument, the frequency band varies over two octaves in general, thereby disabling the correct pitch detection and the correct note-on/note-off detection in some frequency ranges of that instrument.